﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using ICSharpCode.SharpDevelop.Editor;

namespace ICSharpCode.AvalonEdit.Editing
{
	public static class AvalonEditExtensions
	{
		/// <summary>
		/// Deletes the selected content.
		/// </summary>
		/// <param name="editor"></param>
		public static void DeleteSelected(this TextEditor editor)
		{
			if (editor.SelectionLength > 0)
			{
				editor.Text = editor.Text.Remove(editor.SelectionStart, editor.SelectionLength);
			}
		}
	}
}
